#pragma once

#include <QtWidgets/QWidget>
#include "ui_xscreen.h"
#include <QMouseEvent>
#include <QPoint>

class XScreen : public QWidget
{
	Q_OBJECT

public:
	XScreen(QWidget *parent = Q_NULLPTR);
	void timerEvent(QTimerEvent *e);
protected:
	void mousePressEvent(QMouseEvent* event) override;
	void mouseMoveEvent(QMouseEvent* event) override;
	void mouseReleaseEvent(QMouseEvent* event) override;
public slots:
	void Record();
	

private:
	bool isDragging;       // 是否正在拖拽
	QPoint dragPosition;  // 拖拽起始位置
	Ui::XScreenClass ui;
};
